<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>抽奖页面</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: #f4f4f4;
        }
        #drawButton {
            padding: 10px 20px;
            font-size: 16px;
            cursor: pointer;
            background-color: #4CAF50;
            color: white;
            border: none;
            border-radius: 5px;
            transition: background-color 0.3s;
        }
        #drawButton:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
    <button id="drawButton">点击抽奖</button>
    <script>
        const prizes = ['西小匠', '兰州', '大米', '肥汁', '稻谷情', '喜家德', '江西炒粉'];
    
        // 生成指定范围内的随机整数
        function getRandomInt(min, max) {
            min = Math.ceil(min);
            max = Math.floor(max);
            return Math.floor(Math.random() * (max - min + 1)) + min;
        }
        
        // 抽奖函数，随机选择一个奖项并显示
        function drawPrize() {
            const index = getRandomInt(0, prizes.length - 1);
            const winner = prizes[index];
            // 显示中奖信息，这里可以用模态框或者页面上的消息提示
            document.body.innerHTML += `<p>恭喜中奖，获得奖项：${winner}</p>`;
        }
        
        // 为抽奖按钮添加点击事件监听器
        document.getElementById('drawButton').addEventListener('click', drawPrize);
    </script>
</body>
</html>